package com.feign.user;

import com.lhs.Result.Result;
import com.lhs.VO.user.UserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(name = "user-service")
public interface UserFeignClient {



    /**
     * 获取登录中的用户信息
     * @return
     */
    @GetMapping("user/getUserInfo")
    public Result<UserInfoVO> getUserInfo();

    /**
     * 根据id获取用户信息
     * @param userId
     * @return
     */
    @GetMapping("user/getUserInfoById/{id}")
    public Result<UserInfoVO> getUserInfoById(@PathVariable("id") Long userId) ;

    /**
     * 批量获取用户信息
     * @param userIds
     * @return
     */
    @PostMapping("/user/admin/batch")
    Result<Map<Long, UserInfoVO>> getUserInfoBatch(@RequestBody List<Long> userIds);


}


